/*
 *  language.h
 *
 *  $Id$	
 *
 */

#define LANG_DEFAULT	1	// defaults to british english
#define LANG_EN			1
#define LANG_US			2
#define LANG_NO			3

#define STRING_PLAYER1NAME		1
#define STRING_PLAYER2NAME		2
#define STRING_GAMEBEGIN		3
#define STRING_PLAYER1DETAIL	4
#define STRING_PLAYER2DETAIL	5
#define STRING_GOFIRST			6
#define STRING_ITADRAW			7
#define STRING_YOUAREWINNER		8
#define STRING_PLAYAGAIN		9
#define STRING_MOVEPROMPT		10
#define STRING_INVALIDMOVE		11
#define STRING_BADMOVEYOU		12
#define STRING_BADMOVEOTHER		14

struct stringtable {
	int	stringid;		// unique identifier for the string
	char* text;
};

struct languagetable {
	int id;				// unique identifier for the language
	char* code;			// iso code e.g. en,no,es,fr,de
	char* name;			// friendly name for the language
	struct stringtable* strings;
};

// set the active language defintion
void language_setcurrent(int languageid);

// get a string from the currently selected language definition
const char* language_getstring(int stringid);

// lookup language definition based on it's ID
const struct languagetable* language_findbyid(int languageid);

// lookup language definition based on it's ISO code
const struct languagetable* language_findbycode(const char* code);

const char* language_getname(int languageid);

int language_findidbycode(const char* code);
